package Shop;

public class Item {

	private int infoId;
	private int stockId;
	private String name;
	private int price;
	private int estProfit;
	
	public Item(int info, int stock, String itemName, int itemPrice){
		this.infoId = info;
		this.stockId = stock;
		this.name = itemName;
		this.price = itemPrice;
		this.setEstProfit(0);
	}

	public int getInfoId() {
		return infoId;
	}

	public void setInfoId(int infoId) {
		this.infoId = infoId;
	}

	public int getStockId() {
		return stockId;
	}

	public void setStockId(int stockId) {
		this.stockId = stockId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}	
	
	public String toString(){
		return ("Name: " + name + " Price: " + price);
	}
	
	public boolean equals(Object nuevo){
		if(this.getName().equals(((Item)nuevo).getName())){
			return true;
		}
		else return false;
	}

	public void setEstProfit(int estProfit) {
		this.estProfit = estProfit;
	}

	public int getEstProfit() {
		return estProfit;
	}
}
